import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

class  splash extends JFrame
{
	JButton cmd1 = new JButton("OK");
	KanvasCitra gambar=new KanvasCitra();
	Dimension layar = Toolkit.getDefaultToolkit().getScreenSize();
	
	public splash()
		{
		super("CBBI"); 
			setSize(646,508);
			setLocationRelativeTo(null);
			setResizable(false);
			setDefaultCloseOperation(EXIT_ON_CLOSE);		
			komponenVisual();
			setVisible(true); 
			aksi();
		}
		void komponenVisual()
			{
				getContentPane().setLayout(null);
				getContentPane().add(cmd1);
				cmd1.setBounds(376,310,130,40);
				getContentPane().setLayout(new BorderLayout());
				getContentPane().add(gambar,BorderLayout.CENTER);
				setVisible(true);
			}
				public void aksi()
				{
				cmd1.addActionListener(new ActionListener()
					{
					
					public void actionPerformed(ActionEvent evt)
						{
						//new Apps().setVisible(true);
						//	dispose();
						}
					});
					}
class KanvasCitra extends Canvas
	{
	public void paint(Graphics grafis)
		{
		Graphics2D g = (Graphics2D) grafis;
		Image image=new ImageIcon("background.jpg").getImage();
		g.drawImage(image,0,0,this);
		}
	}
	public static void main(String[] args) 
	{
		new splash();
	}
}
